package com.xbongbong.pro.statistic.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.saas.constant.pk.DepartmentPkConstant;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 部门pk方案编辑入参
 *
 * @author 徐俊杰
 * @version v1.0
 * @date 2019/3/22 20:20
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class DepartmentPkEditDTO extends BaseDTO {
    private static final long serialVersionUID = 2528800321982285466L;

    /**
     * 方案id
     */
    @NotNull
    private Long id;
    /**
     * 方案名称
     */
    @NotNull(message = "{dto.msg.departmentPkEdit.name.NotNull}")
    @Length(max = DepartmentPkConstant.MAXIMUM_NAME_LENGTH, message = "{dto.msg.departmentPkEdit.name.Length}")
    private String name;
    /**
     * 参与对比的各个部门，及它们是否包含下属部门
     */
    @NotNull(message = "{dto.msg.departmentPkEdit.depIncludeSub.NotNull}")
    @Size(max = DepartmentPkConstant.MAXIMUM_DEPARTMENTS, min = DepartmentPkConstant.MINIMUM_DEPARTMENTS, message = "{dto.msg.departmentPkEdit.depIncludeSub.Size}")
    @Valid
    private List<DepIncludeSubDTO> depIncludeSub;
}
